/* リセット */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Hiragino Sans", sans-serif;
  background: #b8b8b8;
  color: #222;
  margin: 0;
}

/* 商品ブロック全体 */
.product {
  display: flex;
  align-items: center;        /* ← 写真と説明ブロックを上下中央で揃える */
  justify-content: space-between;
  gap: 40px;
  padding: 60px;
  min-height: 80vh;
}

/* 偶数番目の商品を自動で左右逆にする */
.product:nth-child(even) {
  flex-direction: row-reverse;
}

/* ギャラリー */
.gallery {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.main-slider {
  display: flex;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  width: 100%;
  max-width: 500px;
  margin-bottom: 20px;
  scroll-behavior: smooth;
}

/* 画像を縦900pxで固定 */
.main-slider img {
  flex: 0 0 auto;
  height: 650px;        /* ← 高さを固定 */
  width: auto;
  object-fit: contain;
  scroll-snap-align: center;
  border: 1px solid #ddd;
}

.thumbnails {
  display: flex;
  gap: 10px;
}
.thumbnails img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
}
.thumbnails img:hover {
  border: 2px solid #000;
}

/* 商品詳細 */
.details {
  flex: 1;
  display: flex;                 /* ← 説明文ボックスをflexに */
  flex-direction: column;
  justify-content: center;       /* ← 説明文を縦中央に寄せる */
}
.details h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}
.subtitle {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 15px;
}
.notes {
  font-weight: bold;
  margin-bottom: 20px;
}
.description {
  line-height: 1.8;
  margin-bottom: 20px;
}
.options {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.size {
  padding: 8px 16px;
  border: 1px solid #222;
  background: #fff;
  cursor: pointer;
}
.size:hover {
  background: #222;
  color: #fff;
}
.price {
  font-size: 1.5rem;
  margin-bottom: 20px;
}
.add-to-cart {
  padding: 12px;
  background: #000;
  color: #fff;
  border: none;
  cursor: pointer;
  width: 100%;         
  text-align: center;
}
.add-to-cart:hover {
  opacity: 0.8;
}